<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>推送页面</title>
    <!-- Bootstrap Core CSS -->
    <link href="__PUBLIC__/Theme2/css/bootstrap.min.css" rel='stylesheet' type='text/css'/>
    <!-- Custom CSS -->
    <link href="__PUBLIC__/Theme2/css/style.css" rel='stylesheet' type='text/css'/>
    <link href="__PUBLIC__/Theme2/css/font-awesome.css" rel="stylesheet">
    <!-- jQuery -->
    <script src="__PUBLIC__/Theme2/js/jquery.min.js"></script>
    <link href="__PUBLIC__/Theme2/css/custom.css" rel="stylesheet">
    <!-- Metis Menu Plugin JavaScript -->
    <script src="__PUBLIC__/Theme2/js/metisMenu.min.js"></script>
    <script src="__PUBLIC__/Theme2/js/custom.js"></script>
    <!-- Graph JavaScript -->
    <script src="__PUBLIC__/Theme2/js/d3.v3.js"></script>
    <script src="__PUBLIC__/Theme2/js/rickshaw.js"></script>
    <!-- Bootstrap Core JavaScript -->
    <script src="__PUBLIC__/Theme2/js/bootstrap.min.js"></script>

    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            background: #fff !important;
        }
    </style>
</head>

<body>
<div class="regbox">
    <h3 style='text-align:center; padding-top:160px;'>在<span style=" color:#EF553A"><{$txt_rid}></span>邀请下注册</h3>


    <div id="wrapper">
        <div class="copyrights"></div>


        <div class="col-md-12 graphs reginp">
            <div class="xs">


                <div class="tab-content" style="width:800px;margin:0 auto">
                    <div class="tab-pane active" id="horizontal-form">
                        <form name="fmOrder" action="__URL__/AddAction" method="post" class="form-horizontal"
                              onSubmit="return fmCheck();">
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">会员编号 </label>
                                <div class="col-sm-7">
                                    <!--线上可用 begion
                                    <input type="text" class="form-control1 intwo" name="txt_loginname1" id="txt_loginname1" onBlur="fmCheckUserName('txt_loginname_msg',this.value,'恭喜,可以使用','对不起,该编号已经使用')" style="width:65%;" value="<{$bianhao}>" readonly />
                                    <input type="button" name="Button2" value="生成编号" id="Button2" onClick="MathRand()" style="margin-left:1%;font-size: 12px;"  />
                                     <input type="hidden" value="<{$bianhao}>" name="txt_loginname" id="txt_loginname"  />
                                    end -->
                                    <input type="text" class="form-control1 intwo" name="txt_loginname"
                                           id="txt_loginname"
                                           onBlur="fmCheckUserName('txt_loginname_msg',this.value,'恭喜,可以使用','对不起,该编号已经使用')"
                                           style="width:65%;" value="<{$bianhao}>"/>
                                    <input type="button" name="Button2" value="生成编号" id="Button2" onClick="MathRand()"
                                           style="margin-left:1%;font-size: 12px;"/>
                                    <input type="hidden" value="<{$bianhao}>" name="txt_loginname1"
                                           id="txt_loginname1"/>
                                    <span id="txt_loginname_msg"></span>
                                </div>

                            </div>
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">姓名 </label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control1 intwo" name="txt_bankname" id="txt_bankname"
                                           onBlur="fmname(this.value)" style="width:65%;"/>
                                    <span id="txt_name_msg"></span>


                                </div>
                                <div class="col-sm-3">
                                    <p class="help-block">*</p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">手机号码 </label>
                                <div class="col-sm-7">
                                    <input name="txt_tel" type="text" class="form-control1 intwo" ID="txt_tel"
                                           onBlur="shoujihaoma(this.value)" style="width:65%;"/>
                                    <span id="txt_tel_msg"></span>
                                </div>
                                <div class="col-sm-3">
                                    <p class="help-block">*</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">身份证号 </label>
                                <div class="col-sm-7">
                                    <input name="txt_cardno" type="text" class="form-control1 intwo" ID="txt_cardno"
                                           onBlur="ckcardno(this.value)" style="width:65%;"/>
                                    <span id="txt_cardno_msg"></span>
                                </div>
                                <div class="col-sm-3">
                                    <p class="help-block">*</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">登陆密码 </label>
                                <div class="col-sm-7">
                                    <input name="txt_pwd1" type="password" class="form-control1 intwo" ID="txt_pwd1"
                                           size="20" maxlength="20" onBlur="checkdenglup(this.value)"
                                           style="width:65%;"/>
                                    <span id="txt_dl_msg"></span>

                                </div>
                                <div class="col-sm-3">
                                    <p class="help-block">*(英文字母或数字形式，最多20位)</p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">二级密码 </label>
                                <div class="col-sm-7">
                                    <input name="txt_pwd2" type="password" class="form-control1 intwo" ID="txt_pwd2"
                                           size="20" maxlength="20" onBlur="checkerp(this.value)" style="width:65%;"/>
                                    <span id="txt_er_msg"></span>
                                </div>
                                <div class="col-sm-3">
                                    <p class="help-block">*(英文字母或数字形式，最多20位)</p>
                                </div>
                            </div>

                            <div class="form-group" style="display:none;">
                                <label for="focusedinput" class="col-sm-2 control-label">金额 </label>
                                <div class="col-sm-7">
                                    <{$regAmount}>
                                </div>
                                <div class="col-sm-3">
                                    <p class="help-block">*(英文字母或数字形式，最多20位)</p>
                                </div>
                            </div>

                            <div>
                                <div class="row">
                                    <div class="col-sm-8 col-sm-offset-2">
                                        <input type="hidden" name="txt_rid" value="<{$txt_rid}>"/>
                                        <input name="Submit2" type="submit" class="btn-success btn"
                                               style="    width: 50%;font-size: 18px;" value="提  交">

                                    </div>

                                </div>
                                <div class="money_ma"></div>
                            </div>
                            <input type="hidden" name="tname" id="tname" value="<{$tid}>"/>
                            <div style="display:none;">
                                会员正在注册中，请稍等
                            </div>
                        </form>
                    </div>
                </div>


            </div>

        </div>

    </div>


    <div id="content" class="layout">


        <script language="javascript">

            function MathRand() {
                var Num = "";
                for (var i = 0; i < 8; i++) {
                    Num += Math.floor(Math.random() * 10);
                }
                document.getElementById("txt_loginname1").value = Num;
                document.getElementById("txt_loginname").value = Num;
            }
            function f(n) {
                return document.getElementById(n);
            }
            function fmCheckUserName(str, thisvalue, txt1, txt2) {

                //if (thisvalue==""||thisvalue.length!=8) {alert("会员编号输入错误1！");return false;}
                htmlobj = $.ajax({url: "ajax.php?do=CheckUserName&username=" + escape(thisvalue), async: false});
                if (escape(htmlobj.responseText) == "0") {
                    f(str).innerHTML = txt1;
                    return false;
                }
                if (escape(htmlobj.responseText) == "1") {
                    f(str).innerHTML = txt2;
                    return false;
                }
            }
            function shoujihaoma(thisvalue) {

                var reg = /^\d{9,}$/;

                if (!reg.test(thisvalue)) {
                    document.getElementById("txt_tel_msg").innerHTML = "<font color='red'>手机号码不正确</font>";
                    txt_tel.focus();
                    return false;
                }
                else {
                    document.getElementById("txt_tel_msg").innerHTML = "";
                }


            }

            function ckcardno(thisvalue) {

                var reg = /^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/;

                if (!reg.test(thisvalue)) {
                    document.getElementById("txt_cardno_msg").innerHTML = "<font color='red'>身份证号码不正确</font>";
                    txt_cardno.focus();
                    return false;
                }
                else {
                    document.getElementById("txt_cardno_msg").innerHTML = "";
                }
            }

            function checkdenglup(thisvalue) {
                if (thisvalue.length < 6) {
                    document.getElementById("txt_dl_msg").innerHTML = "<font color='red'>请输入6位以上的登录密码</font>";
                }
                else {
                    document.getElementById("txt_dl_msg").innerHTML = "";
                }
            }
            function checkerp(thisvalue) {
                if (thisvalue.length < 6) {
                    document.getElementById("txt_er_msg").innerHTML = "<font color='red'>请输入6位以上的二级密码</font>";
                }
                else {
                    document.getElementById("txt_er_msg").innerHTML = "";
                }
            }
            function fmname(thisvalue) {
                if (thisvalue.length == 0) {
                    document.getElementById("txt_name_msg").innerHTML = "<font color='red'>姓名不能为空</font>";
                }
                else {
                    document.getElementById("txt_name_msg").innerHTML = "";
                }
            }
            function fmCheck() {
                with (document.fmOrder) {
                    if (txt_loginname.value == "" || txt_loginname.value.length < 6) {
                        alert("会员编号输入错误！");
                        txt_loginname.focus();
                        txt_loginname.style.border = "1px solid #888888";
                        return false;
                    }

                    if (txt_bankname.value == "") {
                        alert("请输入姓名！");
                        txt_bankname.focus();
                        txt_bankname.style.border = "1px solid #888888";
                        return false;
                    }

                    if (txt_rid.value == "") {
                        alert("推荐人不能为空！");
                        txt_rid.focus();
                        txt_rid.style.border = "1px solid #888888";
                        return false;
                    }
                    if (txt_tel.value == "") {
                        alert("请输入手机号码！");
                        txt_tel.focus();
                        txt_tel.style.border = "1px solid #888888";
                        return false;
                    }

                    var reg = /^\d{9,}$/;

                    if (!reg.test(txt_tel.value)) {
                        alert("手机号码不正确！");
                        txt_tel.focus();
                        txt_tel.style.border = "1px solid #888888";
                        return false;
                    }

                    reg = /^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/;

                    if (!reg.test(txt_cardno.value)) {
                        alert("身份证号码不正确！");
                        txt_cardno.focus();
                        txt_cardno.style.border = "1px solid #888888";
                        return false;
                    }
                    if (txt_pwd1.value == "") {
                        alert("请输入登录密码！");
                        txt_pwd1.focus();
                        txt_pwd1.style.border = "1px solid #888888";
                        return false;
                    }

                    if (txt_pwd2.value == "") {
                        alert("请输入二级密码！");
                        txt_pwd2.focus();
                        txt_pwd2.style.border = "1px solid #888888";
                        return false;
                    }
                }
            }


        </script>


    </div>


</div>
</body>
</html>
